//
//  rootViewController.m
//  FFmpeg_X264_Codec
//
//  Created by 陆永亨 on 16/1/8.
//  Copyright © 2016年 suntongmian@163.com. All rights reserved.
//

#import "rootViewController.h"
#import "showVideoListViewController.h"
#import "ViewController.h"
@interface rootViewController ()

@end

@implementation rootViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    [self setupViews];
    
    
    
}
- (void)setupViews
{   // 首页
    
    ViewController * viewVC = [[ViewController alloc]init];
    //    [_chatListVC networkChanged:_connectionState];
    [self setUpChildController:viewVC title:@"录制" imageName:@"" selectedImageName:@""];
    
    showVideoListViewController *loan = [[showVideoListViewController alloc]initWithNibName:@"showViewController" bundle:nil];
    [self setUpChildController:loan title:@"列表" imageName:@"" selectedImageName:@""];

 
}

- (void)setUpChildController:(UIViewController *)controller title:(NSString *)title imageName:(NSString *)image selectedImageName:(NSString *)selectedImage
{
    
    controller.title = title;
    // 底部字体颜色
    self.tabBar.tintColor = [UIColor blackColor];
    //默认的图片
    [controller.tabBarItem setImage:[UIImage imageNamed:image]];
    
    //选择时的图片,将其渲染方式设置为原始的颜色
    [controller.tabBarItem setSelectedImage:[[UIImage imageNamed:selectedImage]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]];
    
    [self addChildViewController:controller];
    
    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
